[PHP] Processing custom XML namespace within XSL
Posted
by
sander
on Stack Overflow
See other posts from Stack Overflow
or by sander
Published on 2011-06-27T12:20:11Z
Indexed on
2011/06/27
16:22 UTC
Read the original article
Hit count: 211
I'm using the php class XSLTProcessor to generate HTML from a xsl. Within the xsl, I'd like all my custom namespace elements to be processed by my own processor class.
So for example:
<xsl:for-each select="doc/elements/*">
<doc:renderElement element="." />
</xsl:for-each>
This should call the method renderElement of an instance of my custom processor class.
I know I can enable calling php functions by using the registerPHPFunctions function. However, this only seems to support calling static methods.
© Stack Overflow or respective owner